package com.plian.system.entity.pf;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @description: 职工福利费支出明细主表
 * @author: gangan
 * @create: 2020-05-28 11:24
 */
@Data
@TableName("pf_base_welfare_expend")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class BaseWelfareExpend extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 单据编码
     */
    private String code;

    /**
     * 填报年月
     */
    private String fillingMonth;

    /**
     * 填报年度
     */
    private String fillingYear;

    /**
     * 填报日期
     */
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE, timezone = "Asia/Shanghai")
    private Date fillingDate;

    /**
     * 填报单位
     */
    private String fillingUnitId;

    /**
     * 审批人
     */
    private String approvedUser;

    /**
     * 审批时间
     */
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    private Date approvedTime;

    /**
     * 审批意见
     */
    private String approvedOpinion;

    /**
     * 流程实例id
     */
    private String formType;

    /**
     * 1单户表 2汇总表
     */
    private Integer type;

    @TableField(exist = false)
    private List<WelfareExpend> welfareExpends;

    @TableField(exist = false)
    private List<Long> childIds;

}
